import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./router";
import "@/style/index.scss";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import type { Component } from "vue";
import IconFont from "@/components/IconFont.vue";

const app = createApp(App);

// 引入全部icon
Object.entries(ElementPlusIconsVue).forEach(([key, component]) => {
  app.component(key, component as Component);
});
app.use(createPinia());
app.use(router);
app.use(ElementPlus);
// 引入iconFont字体图标
app.component("IconFont", IconFont);

app.mount("#app");
